package com.bath.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

@MappedSuperclass
public class Model extends ModelAtom {
	private static final long serialVersionUID = -7841055429818865427L;
	
	private String creator = "sys";
	private String updater = "sys";
	private Date dateOfCreate = new Date();
	private Date dateOfUpdate = new Date();
	private String memo = "";
	
	public Model() {}
	
	@Column(name = "CreateOfTime")
	public Date getDateOfCreate() {
		return dateOfCreate;
	}

	public void setDateOfCreate(Date dateOfCreate) {
		this.dateOfCreate = dateOfCreate;
	}
	
	@Column(name = "UpdateOfTime")
	public Date getDateOfUpdate() {
		return dateOfUpdate;
	}

	public void setDateOfUpdate(Date dateOfUpdate) {
		this.dateOfUpdate = dateOfUpdate;
	}
	
	@Column(name = "Memo")
	public String getMemo() {
		return memo;
	}
	
	public void setMemo(String memo) {
		this.memo = memo;
	}
	/*
	@ManyToOne(cascade = {CascadeType.PERSIST}, fetch=FetchType.LAZY)
	@JoinColumn(name = "CreateOfUser")
	*/
	@Column(name = "CreateOfUser")
	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}
	/*
	@ManyToOne(cascade = {CascadeType.PERSIST}, fetch=FetchType.LAZY)
	@JoinColumn(name = "UpdateOfUser")
	*/
	@Column(name = "UpdateOfUser")
	public String getUpdater() {
		return updater;
	}

	public void setUpdater(String updater) {
		this.updater = updater;
	}

}
